package com.example.demo;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;

/**
 * @Auther: 10070436
 * @Date: 2019/1/9 19:55
 * @Description: ZGS
 */
public class Demo {
    public static void main(String[] args) {

        List<Orders> list = Arrays.asList(

                new Orders("1","1"),
                new Orders("2","2"),
                new Orders("1","1")

        );

        list.stream().filter(order -> order.getB2bOrderCode().equals("2"));


        System.out.println("==============================================");
        //boolean result = list.stream().allMatch( item -> item.getB2bOrderCode().equals(list.get(0).getB2bOrderCode()) );
        //System.out.println(result);

        boolean b = !list.stream().anyMatch(item -> item.getTmsIOrderCode().equals("1"));

        System.out.println(b);


        try {
            int i = 1/0;
        } catch (Exception e) {
            //System.out.println("=======================");
            throw new RuntimeException(".................");
        }

        System.out.println("----------------------------");

    }

}
